<div class="portlet">
  <div class="portlet-header">
    <h1><%=t ".title"%></h1>
  </div>
  <div class="portlet-content">
    <% form_for(@localuser, {:url => localusers_path, :post => true}) do |f| %>
    <%= f.error_messages %>
        <table>
          <tbody>
            <tr>
              <td> <%= f.label t('activerecord.attributes.user.email') %> </td>
              <td> <%= f.text_field :email %> </td>
            </tr>
            <tr>
              <td><%= f.label t('lbl_user_send_invitation') %></td>
              <td>
                <%="#{check_box_tag 'send_invitation', 'yes', true}"%>
                <%=t('lbl_user_send_invitation_message')%>
              </td>
            </tr>
            <tr>
              <td> <%= f.label t('activerecord.attributes.user.password') %> </td>
              <td> <%= f.password_field :password %> </td>
            </tr>
            <tr>
              <td> <%= f.label t('activerecord.attributes.user.password_confirm') %> </td>
              <td> <%= f.password_field :password_confirmation %> </td>
            </tr>
            <tr>
              <td> <%= f.label t('activerecord.attributes.user.roles') %> </td>
              <td>
                <% for role in User::ROLES %>
                 <%= check_box_tag "user[roles][]", role, @localuser.roles.include?(role) %>
                 <%= h t(role) %>
                <% end %>
                <%= hidden_field_tag "user[roles][]"%>
              </td>
            </tr>
          </tbody>
        </table>
      <div class="line-buttons">
        <%= f.submit t('btn_create')%>
      </div>
      <div class="line-links">
        <%= link_to t('btn_back'), localusers_redirect_back_path(localusers_path) %>
      </div>
    <% end %>
  </div>

  <div class="portlet-footer">
  </div>
</div>
